import request from '@/utils/request'

export function getList(params) {
  return new Promise(resolve => {
    resolve(request({
      url: '/cart/getList',
      method: 'get',
      params
    }))
  })
}

export function addCart(data) {
  return new Promise(resolve => {
    resolve(request({
      url: '/cart/addCart',
      method: 'post',
      data
    }))
  })
}

export function deleteCart(params) {
  return new Promise(resolve => {
    resolve(request({
      url: '/cart/delete',
      method: 'get',
      params
    }))
  })
}
